
package com.wzn.service;

import com.wzn.service.OrderService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.sql.SQLException;

public final class SpringNamespaceWithDefaultDataSourceMain {


    public static void main(final String[] args) throws SQLException {

        ApplicationContext applicationContext = new ClassPathXmlApplicationContext("classpath:applicationContextWithDefaultDataSource.xml");

        System.out.println("[Monitor] [INFO] applicationContext:{}"+applicationContext);

        OrderService orderService = applicationContext.getBean(OrderService.class);
        //orderService.insert();
        //orderService.select();
        //orderService.delete();
        orderService.select();

    }
}
